package object2;
/**
 * @Author:CJJ
 * @Date:2025/4/28
 * Cat
 */
public class Cat {
    String name;
    String color;

    public Cat(String name,String color)
    {
        this.name=name;
        this.color=color;
    }

    @Override
    public String toString() {
        return "Cat{" + "name='" + name + '\'' + ", color='" + color + '\'' + '}';
    }

    public static void main(String[] args) {
        Cat c1 = new Cat("Tom","white");
        Cat c2 = new Cat("Tom","blue");
        //System.out.println(c1.equals(c2));
        //System.out.println(c1==c2);//判断两个内存地址是否一致,一般用在基本数据类型上
      System.out.println(c1);
      System.out.println(c1.toString());

    }

}
